#include("../layout/header.html")
#@layout()
#define content()

<head>
  <style>
    #formAdvForm .layui-form-item {
      margin-top: 20px;
      margin-bottom: 0;
    }

    #formAdvForm .layui-form-item .layui-inline {
      margin-bottom: 25px;
      margin-right: 0;
    }

    .form-group-bottom {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      padding: 10px 20px;
      background-color: #fff;
      box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, .05);
    }
  </style>
</head>
<body>
<!-- 正文开始 -->
<form class="layui-form" id="formAdvForm" lay-filter="formAdvForm">
  <div class="layui-fluid" style="padding-bottom: 75px;">
    <div class="layui-card">
      <div class="layui-card-header">基础信息</div>
      <div class="layui-card-body">

        <div class="layui-form-item layui-row">
          <div class="layui-inline layui-col-md4">
            <label class="layui-form-label layui-form-required">作者:</label>
            <div class="layui-input-block">
              <select name="author" lay-verType="tips" lay-verify="required" required>
                <option value="">请选择</option>
                <option value="fujian" selected>fujian</option>
              </select>
            </div>
          </div>
          <div class="layui-inline layui-col-md4">
            <label class="layui-form-label layui-form-required">包名:</label>
            <div class="layui-input-block">
              <input name="packageName" placeholder="请输入包名 com.aisinjuaro.ai3.module" class="layui-input" value="com.aisinjuaro.ai3.module"
                     lay-verType="tips" lay-verify="required" required/>
            </div>
          </div>
          <div class="layui-inline layui-col-md4">
            <label class="layui-form-label layui-form-required">模块名:</label>
            <div class="layui-input-block">
              <input name="moduleName" placeholder="请输入模块名 sys" class="layui-input"
                     lay-verType="tips" lay-verify="required" required/>
            </div>
          </div>

          <div class="layui-inline layui-col-md4">
            <label class="layui-form-label layui-form-required">表名:</label>
            <div class="layui-input-block">
              <input name="tableName" placeholder="请输入表名 sys_user" class="layui-input"
                     lay-verType="tips" lay-verify="required" required/>
            </div>
          </div>

          <div class="layui-inline layui-col-md12">
            <label class="layui-form-label layui-form-required">文件类型:</label>
            <div class="inline-block" >
              <input type="checkbox" name="entity" title="Entity" checked/>
              <input type="checkbox" name="service" title="Service"checked/>
              <input type="checkbox" name="dao" title="Dao"checked/>
              <input type="checkbox" name="controller" title="Controller"checked/>
              <input type="checkbox" name="html" title="html"checked/>
              <input type="checkbox" name="param" title="param"/>
              <input type="checkbox" name="xml" title="xml"/>
            </div>
          </div>
        </div>

      </div>
    </div>


  </div>

  <div class="form-group-bottom text-right">
    <button type="reset" class="layui-btn layui-btn-primary">&emsp;重置&emsp;</button>
    <button class="layui-btn" lay-filter="formAdvSubmit" lay-submit>&emsp;提交&emsp;</button>
  </div>

</form>

<!-- js部分 -->
<script type="text/javascript" src="/static/libs/layui/layui.js"></script>
<script type="text/javascript" src="/static/js/common.js?v=318"></script>
<script>
  layui.use(['layer', 'form', 'table', 'laydate','admin'], function () {
    var $ = layui.jquery;
    var layer = layui.layer;
    var form = layui.form;
    var table = layui.table;
    var laydate = layui.laydate;
    var admin = layui.admin;


    /* 渲染laydate */
    laydate.render({
      elem: '#formAdvDateSel1',
      range: true,
      trigger: 'click'
    });
    laydate.render({
      elem: '#formAdvDateSel2',
      trigger: 'click'
    });

    /* 监听表单提交 */
    form.on('submit(formAdvSubmit)', function (data) {

      // 表格选择的数据放到data.field中
      console.log(JSON.stringify(data.field))

      admin.req('/gc/go',JSON.stringify(data.field), function(res){
        console.log(res);
      }, 'post');

      return false;
    });

  });
</script>
</body>
#end
